package com.huashun.ship.run.shiplock.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * Rest接口通用数据返回对象
 * @author yzh
 * @version 0.0.1
 * @since 20200510
 */
@Data
public class RestResultDTO<T> implements Serializable {
    @ApiModelProperty(value = "请求是否成功")
    private boolean success;
    @ApiModelProperty(value = "HTTP状态码")
    private String statusCode;
    @ApiModelProperty(value = "请求处理结果说明")
    private String msg;
    @ApiModelProperty(value = "返回数据")
    private T data;

    public RestResultDTO(){
        this.success = true;
        this.statusCode = "200";
        this.msg = "请求成功";
    }
}
